package com.onion.codegen.db;

import java.util.HashMap;
import java.util.Map;

public class JavaSQLType {

	public final static Map<String, String> sqlTypeImportMap = new HashMap<>();

	public final static Map<String, String> sqlTypeColumnMap = new HashMap<>();

	static {
		sqlTypeImportMap.put("VARCHAR", "java.lang.String");
		sqlTypeImportMap.put("CHAR", "java.lang.String");
		sqlTypeImportMap.put("BLOB", null);
		sqlTypeImportMap.put("TINYBLOB", null);
		sqlTypeImportMap.put("VARCHAR", "java.lang.String");
		sqlTypeImportMap.put("INT", "java.lang.Integer");
		sqlTypeImportMap.put("TINYINT", "java.lang.Integer");
		sqlTypeImportMap.put("BIGINT", "java.lang.Long");
		sqlTypeImportMap.put("INT UNSIGNED", "java.lang.Integer");
		sqlTypeImportMap.put("TEXT", "java.lang.String");
		sqlTypeImportMap.put("INTEGER UNSIGNED", "java.lang.Long");
		sqlTypeImportMap.put("TINYINT UNSIGNED", "java.lang.Integer");
		sqlTypeImportMap.put("SMALLINT UNSIGNED", "java.lang.Integer");
		sqlTypeImportMap.put("MEDIUMINT UNSIGNED", "java.lang.Integer");
		sqlTypeImportMap.put("BIT", "java.lang.Boolean");
		sqlTypeImportMap.put("BIGINT UNSIGNED", "java.math.BigInteger");
		sqlTypeImportMap.put("FLOAT", "java.lang.Float");
		sqlTypeImportMap.put("DOUBLE", "java.lang.Double");
		sqlTypeImportMap.put("DECIMAL", "java.math.BigDecimal");
		sqlTypeImportMap.put("DATE", "java.util.Date");
		sqlTypeImportMap.put("TIME", "java.util.Time");
		sqlTypeImportMap.put("DATETIME", "java.lang.String");
		sqlTypeImportMap.put("TIMESTAMP", "java.lang.String");
		sqlTypeImportMap.put("YEAR", "java.util.Date");

		sqlTypeColumnMap.put("VARCHAR", "String");
		sqlTypeColumnMap.put("CHAR", "String");
		sqlTypeColumnMap.put("BLOB", "byte[]");
		sqlTypeColumnMap.put("TINYBLOB", "byte[]");
		sqlTypeColumnMap.put("VARCHAR", "String");
		sqlTypeColumnMap.put("INT", "Integer");
		sqlTypeColumnMap.put("TINYINT", "Integer");
		sqlTypeColumnMap.put("BIGINT", "Long");
		sqlTypeColumnMap.put("INT UNSIGNED", "Integer");
		sqlTypeColumnMap.put("TEXT", "String");
		sqlTypeColumnMap.put("INTEGER UNSIGNED", "Long");
		sqlTypeColumnMap.put("TINYINT UNSIGNED", "Integer");
		sqlTypeColumnMap.put("SMALLINT UNSIGNED", "Integer");
		sqlTypeColumnMap.put("MEDIUMINT UNSIGNED", "Integer");
		sqlTypeColumnMap.put("BIT", "Boolean");
		sqlTypeColumnMap.put("BIGINT UNSIGNED", "BigInteger");
		sqlTypeColumnMap.put("FLOAT", "Float");
		sqlTypeColumnMap.put("DOUBLE", "Double");
		sqlTypeColumnMap.put("DECIMAL", "BigDecimal");
		sqlTypeColumnMap.put("DATE", "Date");
		sqlTypeColumnMap.put("TIME", "Time");
		sqlTypeColumnMap.put("DATETIME", "String");
		sqlTypeColumnMap.put("TIMESTAMP", "String");
		sqlTypeColumnMap.put("YEAR", "Date");
	}
}
